﻿@model IEnumerable<Forest.Cat.Web.Models.LinkModel> 
@using Forest.Cat.Domain.Shared
<div class="Links_pics">
    <h3 style="padding-top: 10px; padding-bottom:5px;">
        特别推荐</h3>
    @foreach (var item in Model.Where(x => x.AreaCode.Equals((int)LinkType.Picture)).OrderBy(x => x.SortOrder)) { 
        <a href="@item.NavigateUrl" target="_blank">
            <img src="@Url.Action("GetLinkImage", new { id = item.Id })" width="90" height="31" alt="" />
        </a>
    }
</div>
<br />
@if (Convert.ToString(ViewContext.ParentActionViewContext.RouteData.Values["controller"]).ToLower() == "home"
    && Convert.ToString(ViewContext.ParentActionViewContext.RouteData.Values["action"]).ToLower() == "index") {
    <div class="Links_company" style="clear: both">
        <h3 style="">
            友情链接</h3>
        @foreach (var item in Model.Where(x => x.AreaCode.Equals((int)LinkType.Text)).OrderBy(x => x.SortOrder)) { 
            <a href="@item.NavigateUrl" target="_blank">
                @item.Text
            </a><text> | </text>
        }
    </div>
}
